package org.cos.generation.util.predict;

/**
 * The set which present as range relation.
 * Such as EQUAL, GREATER, LESS, EQUAL or GREATER, EQUAL or LESS.
 * @author ZXD
 *
 */

public class RangePredictSet implements PredictSet {

	/** The reference of the range. */
	private Object lower;
	
	private Object upper;
	
	/**
	 * Constructor with nothing, which construct a all possible set.
	 */
	public RangePredictSet() {
	}
	
	/**
	 * Constructor with relation and key.
	 * @param relation
	 * @param key
	 */
	public RangePredictSet(Object lower, Object upper) {
		this.lower = lower;
		this.upper = upper;	
	}
	
	/**
	 * Present the set as string which outputted for test.
	 */
	@Override
	public String toString() {
		String str = "";
		str += lower;
		str += "-";
		str += upper;
		return str;
	}
	
	public boolean isAll() {
		if (lower == null && upper == null) return false;
		else return true;
	}
	
	public SetType getType() {
		return SetType.RANGE;
	}

	public PredictSet getSet() {
		return this;
	}

	public boolean contains(Object o) {
		// TODO Auto-generated method stub
		return false;
	}
	
}
